USE [influenza]
GO

/****** Object:  StoredProcedure [dbo].[SP_muestraProcedimientos]    Script Date: 01/19/2010 03:25:22 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

create PROCEDURE [dbo].[SP_muestraProcedimientos]
@nUnidad varchar(8)
as
Begin

set dateformat mdy

declare @qry varchar(8000)

set @qry='select distinct c.id_proc,c.procedimiento from cat_AdminLab a
inner join cat_lab_proc c on(a.id_lab_proc=c.id_proc)
inner join Cat_Laboratorio l on (a.id_lab_tipoLab=l.nPerfil)
Where l.id_laboratorio='+@nUnidad+' and a.activo=1'
exec (@qry)
END
GO

